package org.gaaidou.ptarmigan.springboot.functional;

import org.gaaidou.ptarmigan.springboot.functional.util.RestfulSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.test.web.server.LocalServerPort;


@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public abstract class BaseTester {
    @LocalServerPort
    private int port;

    @Autowired
    private TestRestTemplate restTemplate;

    protected RestfulSender perform() {
        return RestfulSender.start(restTemplate, port);
    }


}
